<template>
    <el-col :span="12">
      <img src="../../assets/logo.png" height="60" width="60" style="position: absolute;left: 12%;"/>
      <el-menu
        class="el-menu-vertical-demo"
        text-color="#717173"
        router
        :default-active="$route.path"
        :default-openeds="openurl"
        unique-opened>
        <el-submenu index="1">
          <template slot="title">
            <span class="navSpan" >用户管理</span>
          </template>
          <el-menu-item-group >
            <el-menu-item  @click="open1"  index="/user/manage/studentlist" class="subSpan sub1">学员管理</el-menu-item>
            <el-menu-item  @click="open1"  index="/user/manage/teacherlist" class="subSpan sub2">教师管理</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="2" >
          <template slot="title">
            <span class="navSpan">期数</span>
          </template>
          <el-menu-item-group >
            <el-menu-item  @click="open2" index="/term/termlist" class="subSpan sub1">全部期数</el-menu-item>
            <el-menu-item  @click="open2" index="/term/termadd" class="subSpan sub2">新建期数</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">
            <span class="navSpan">信息管理</span>
          </template>
          <el-menu-item-group >
            <el-menu-item @click="open3" index="/info/Mangae/input" class="subSpan sub1">导入</el-menu-item>
            <el-menu-item @click="open3" index="/info/mangae/output" class="subSpan sub2">导出</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title">
            <span class="navSpan" >课程分配</span>
          </template>
          <el-menu-item-group>
            <el-menu-item @click="open4" index="/course/classadd" class="subSpan sub1">分配课表</el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <el-menu-item @click="open5" index="/course/classlist" class="subSpan sub1">课表管理</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="5">
          <template slot="title">
            <span class="navSpan" >评价问卷管理</span>
          </template>
          <el-menu-item-group>
            <el-menu-item @click="open6" index="/evaluate/assign" class="subSpan sub1">启用问卷</el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <el-menu-item @click="open7" index="/evaluate/addquestion" class="subSpan sub1">添加问卷</el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <el-menu-item @click="open8" index="/evaluate/allfinished" class="subSpan sub1">已完成评价</el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <el-menu-item @click="open9" index="/evaluate/unfinished" class="subSpan sub1">未完成评价</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="6">
          <template slot="title">
            <span class="navSpan" >指标评价</span>
          </template>
          <el-menu-item-group>
            <el-menu-item @click="open10" index="/evaluate/evaluationEfficiency" class="subSpan sub1">导出</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
      </el-menu>
    </el-col>
</template>

<script>
  var openurlx=['0',]   //利用created刷新路由菜单状态（保存菜单状态，created不会重置该变量）
    export default {
      name: "munueMain",
      data() {
        return {
          openurl:['0',],
        };
      },
      methods:{
        open1(){
          openurlx=['1',]
        },open2(){
          openurlx=['2',]
        },open3(){
          openurlx=['3',]
        },open4(){
          openurlx=['4',]
        },open5(){
          openurlx=['5',]
        },open6(){
          openurlx=['6',]
        },open7(){
          openurlx=['7',]
        },open8(){
          openurlx=['8',]
        },open9(){
          openurlx=['9',]
        },open10(){
          openurlx=['10',]
        },
        upopenUrl(){
          this.openurl=openurlx;
        }
      },
      created(){
        this.upopenUrl();
      },
      computed:{
      }
    }
</script>

<style scoped>
.el-menu-vertical-demo{
  top: 60px;
  left: 0;
  width: 25%;
  height: 100%;
  border: 0;
  text-align: left;
  overflow-x: hidden;
  overflow-y: scroll;
  white-space: nowrap;
}
::-webkit-scrollbar {
  width: 0 !important;
}
::-webkit-scrollbar {
  width: 0 !important;
  height: 0;
}
</style>
